package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.enums.ePlayerAttrType;

/**
 * 玩家属性类
 */
public class UserAttribute extends DataObject {

	private long userId;

	private ePlayerAttrType type;

	private long value;

	private long lastUpdateTime = 0;

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		if(this.userId != userId) {
			this.userId = userId;
			setOp(DataStatus.Update);
		}
	}

	public ePlayerAttrType getType() {
		return type;
	}

	public void setType(ePlayerAttrType type) {
		if (this.type != type) {
			this.type = type;
			this.setOp(DataStatus.Update);
		}
	}

	public long getValue() {
		return value;
	}

	public void setValue(long value) {
		if (this.value != value) {
			this.value = value;
			this.setOp(DataStatus.Update);
		}
	}

	public long getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(long lastUpdateTime) {
		if (this.lastUpdateTime != lastUpdateTime) {
			this.lastUpdateTime = lastUpdateTime;
			this.setOp(DataStatus.Update);
		}
	}

}
